package cn.sibu.myroot;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

import cn.sibu.myroot.actionbar.OptionsActivity;

public class MainActivity extends AppCompatActivity {

    private MySurfaceView mySurfaceView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        mySurfaceView  = (MySurfaceView) findViewById(R.id.mySurfaceView);
    }

   private void init(){

   }

    public  void  onClick(View view){

      /*  int currentVis = view.getSystemUiVisibility();
        int newVis ;
        if((currentVis & View.SYSTEM_UI_FLAG_LOW_PROFILE)==View.SYSTEM_UI_FLAG_LOW_PROFILE){
            newVis = View.SYSTEM_UI_FLAG_VISIBLE;//默认模式
        }else {
            newVis = View.SYSTEM_UI_FLAG_LOW_PROFILE;//夜光模式
        }
        view.setSystemUiVisibility(newVis);*/
        //这里我们只需要点击屏幕即可隐藏控件,因为控件隐藏后
        //只要点击一下屏幕,android系统就会让控件自动重新出现
     /*   view.setSystemUiVisibility(
                *//**
                 * 显示/隐藏系统元素时不要移动我们的布局
                 * *//*
                View.SYSTEM_UI_FLAG_LAYOUT_STABLE
                        *//**
                         * 这个标识会隐藏系统状态栏.如果请求ACTON_BAR_OVERLAY,会同时隐藏Action Bar
                          *//*
                |View.SYSTEM_UI_FLAG_FULLSCREEN
                |View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
        );*/

      /*  Intent intent = new Intent(MainActivity.this,LayoutAdapterActivity.class);
        startActivity(intent);*/
        Intent intent = new Intent(MainActivity.this, OptionsActivity.class);
        startActivity(intent);
    }
}
